<template>
  <div>
    <div class="pes">
      <p class="p">你可能感兴趣的人</p>
      <div
        class="pes-cent"
        v-for="(v, i) in this.$store.state.peson.text"
        :key="i"
      >
        <div class="left">
          <img :src="v.userpic" />
          <div>
            <p class="p2">{{ v.uname }}</p>
            <p class="p3">29.3万粉丝 | 宝藏村名的日常</p>
          </div>
        </div>
        <div class="gz" @click="guanzhu(v)">+关注</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  created() {
    this.$store.dispatch("dat");
  },
  methods: {
    guanzhu(v) {
      this.$router.push({
        path: "/all",
      });
      let arr = [];
      if (window.sessionStorage.getItem("gzList")) {
        arr = JSON.parse(window.sessionStorage.getItem("gzList"));
      }
      arr.push(v);
      window.sessionStorage.setItem("gzList", JSON.stringify(arr));
    },
  },
};
</script>

<style scoped>
.pes {
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  padding-top: 0.45rem;

  width: 100%;
  height: auto;
  font-weight: 550;
}
.p {
  font-size: 0.3rem;
  color: #353535;
  margin-bottom: 00.35rem;
}
img {
  width: 1.08rem;
  height: 1.08rem;
  border-radius: 50%;
}
.p2 {
  margin-bottom: 0.2rem;
  font-size: 0.27rem;
  color: #444444;
}
.p3 {
  font-size: 0.18rem;
  color: #aaaaaa;
}
.left {
  display: flex;
  justify-content: left;
  align-items: center;
}
.gz {
  display: inline-block;
  width: 1.16rem;
  height: 0.48rem;
  border: 0.02rem solid #fe3c2b;
  text-align: center;
  line-height: 00.48rem;
  border-radius: 0.2rem;
  color: #fe3c2b;
  margin-top: 0.14rem;
  font-size: 0.21rem;
}
.pes-cent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
}
</style>